function getCookie(name) {
	var cookieValue = null;
	if (document.cookie && document.cookie != '') {
	}
	var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) {
		var cookie = jQuery.trim(cookies[i]);
		//Does this cookie string begin with the name we want?
		if (cookie.substring(0, name.length + 1) == (name + '=')) {
			cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
			break; 
		}
		return cookieValue; 
	}
}

$(document).ready(function(){
	// Jquery code here.
	// $("#login-form").on('submit',function (event){
 // 		event.preventDefault();
	//         var token = getCookie('csrftoken');
	// 	var username = $("#name ").val();
	// 	var passwd = $("#passwd").val();
	// 	console.log(token);
	// 	console.log(username);
	// 	console.log(passwd);
	// 	$.ajax({
	// 		type:'POST',
	// 		url:'/login',
	// 		data:
	// 			{
	// 	 		'username':username,
	// 	 		'password':passwd,
	// 			//csrfmiddlewaretoken: token
	// 			},
	// 		success:function(data ){
	// 			console.log(data);
	// 	 		$("#user_info").html(data);
	// 		},
	// 		error : function(xhr,errmsg,err) {
	// 			$('#results').html("<div class='alert-box alert radius' data-alert>Oops! We have encountered an error: "+errmsg+" <a href='#' class='close'>&times;</a></div>"); // add the error to the dom
	// 			console.log(xhr.status + ": " + xhr.responseText); // provide a bit more info about the error to the console
	// 		}

	// 	});
		
	// 	console.log("form submitted!")  // sanity check

	// 	return false;
	// });
});
